package com.tiza.xiaoyoubao.app;

import android.webkit.WebViewFragment;

import com.tiza.xiaoyoubao.R;
import com.tiza.xiaoyoubao.ui.fragment.*;

/**
 * Created by mapple on 17/2/13.
 */

public enum SimpleBackPage {
    TBUNDO(132, R.string.title_tb_undo, TbOnDoFragment.class),
    TBCOMPLETE(133, R.string.title_tb_complete, TbComplateFragment.class),
    TBUNCOMPLETE(134, R.string.title_tb_uncomplete, TbUnComplateFragment.class),
    DIANFUTBTASK2(135, R.string.title_tb_task, DianFuTbTask2Fragment.class),
    TAOBAORULE(136, R.string.title_id_card_rule, TaoBaoRuleFragment.class),
    IDCARDRULE(137, R.string.title_id_card_rule, IdCardRuleFragment.class),
    CANCLETASK(138, R.string.title_cancle_task, CancleTaskFragment.class),
    TAOBAOBINDDING2(139, R.string.title_taobao_bindding, TaoBaoBinding2Fragment.class),
    TAOBAOBINDDINGDETAIL(140, R.string.title_taobao_bindding, TaoBaoBindingDetailFragment.class),
    EVA(141, R.string.title_eva, EvaFragment.class),
    COMPLAIN(142, R.string.title_complain, ComplainFragment.class),
    RANK(143, R.string.title_rank, RankFragment.class),
    NEWTEACH(144, R.string.title_new_teach, NewTeachFragment.class),
    NOTICE(145, R.string.title_notice, NoticeFragment.class),
    SIGNIN(146, R.string.title_sign_in, SignInFragment.class),
    BROWSETBOPERATIONTASK(147, R.string.title_operation_task, BrowseTbOperationTaskFragment.class),
    BROWSETBATTENTION(148, R.string.title_attention, BrowseTbAttentionFragment.class),
    BROWSETBTASKDETIAL(149, R.string.title_tb_task,BrowseTbTaskDetialFragment.class),
    BROWSETBTASK(150, R.string.title_tb_task,BrowseTbTaskFragment.class),
    DIANFUTBOPERATIONTASK(151, R.string.title_operation_task, DianFuTbOperationTaskFragment.class),
    DIANFUTBATTENTION(152, R.string.title_attention, DianFuTbAttentionFragment.class),
    DIANFUTBTASKDETIAL(153, R.string.title_tb_task,DianFuTbTaskDetialFragment.class),
    DIANFUTBTASK(154, R.string.title_tb_task, DianFuTbTaskFragment.class),
    BROWSEDNTASKDETAIL2(155, R.string.title_browse_dn_detial2, BrowseDnTaskDetail2Fragment.class),
    BROWSEMPTASKDETAIL2(156, R.string.title_browse_mp_detial2, BrowseMpTaskDetail2Fragment.class),
    BROWSEDNTASK2(157, R.string.title_browse_dn_task2, BrowseDnTask2Fragment.class),
    BROWSEMPTASK2(158, R.string.title_browse_mp_task2, BrowseMpTask2Fragment.class),
    DNTAOBAOTASKDETAIL2(159, R.string.title_dn_taobao_detial2, DnTbTaskDetail2Fragment.class),
    MPMGJTASKDETAIL2(160, R.string.title_mp_mgj_detial2, MpMGJTaskDetail2Fragment.class),
    MPMLSTASKDETAIL2(161, R.string.title_mp_mls_detial2, MpMLSTaskDetail2Fragment.class),
    MPJDTASKDETAIL2(162, R.string.title_mp_jd_detial2, MpJdTaskDetail2Fragment.class),
    MPTMTASKDETAIL2(163, R.string.title_mp_tm_detial2, MpTmTaskDetail2Fragment.class),
    MPTAOBAOTASKDETAIL2(164, R.string.title_mp_taobao_detial2, MpTbTaskDetail2Fragment.class),
    DNTAOBAOTASK2(165, R.string.title_dn_taobao_task, DnTaoBaoTask2Fragment.class),
    MPMGJTASK2(166, R.string.title_mp_mgj_task, MpMGJTask2Fragment.class),
    MPMLSTASK2(167, R.string.title_mp_mls_task, MpMLSTask2Fragment.class),
    MPJDTASK2(168, R.string.title_mp_jd_task, MpJDTask2Fragment.class),
    MPTMTASK2(169, R.string.title_mp_tianmao_task, MpTmTask2Fragment.class),
    MPTAOBAOTASK2(170, R.string.title_mp_taobao_task, MpTaoBaoTask2Fragment.class),
    BROWSEMGJOPERATIONTASK(171, R.string.title_operation_task,
                           BrowseMGJOperationTaskFragment.class
    ),
    BROWSEMLSOPERATIONTASK(172, R.string.title_operation_task,
                           BrowseMLSOperationTaskFragment.class
    ),
    BROWSEJDOPERATIONTASK(173, R.string.title_operation_task, BrowseJDOperationTaskFragment.class),
    BROWSETMOPERATIONTASK(174, R.string.title_operation_task, BrowseTMOperationTaskFragment.class),
    BROWSEDNOPERATIONTASK(175, R.string.title_operation_task, BrowseDnOperationTaskFragment.class),
    BROWSEMGJATTENTION(176, R.string.title_attention, BrowseMGJAttentionFragment.class),
    BROWSEMLSATTENTION(177, R.string.title_attention, BrowseMLSAttentionFragment.class),
    BROWSEJDATTENTION(178, R.string.title_attention, BrowseJDAttentionFragment.class),
    BROWSETMATTENTION(179, R.string.title_attention, BrowseTMAttentionFragment.class),
    BROWSEDNATTENTION(180, R.string.title_attention, BrowseDnAttentionFragment.class),
    BROWSEMPMGJTASKDETIAL(181, R.string.title_mp_taobao_detial,
                          BrowseMpMGJTaskDetialFragment.class
    ),
    BROWSEMPMLSTASKDETIAL(182, R.string.title_mp_taobao_detial,
                          BrowseMpMLSTaskDetialFragment.class
    ),
    BROWSEMPJDTASKDETIAL(183, R.string.title_mp_taobao_detial, BrowseMpJDTaskDetialFragment.class),
    BROWSEMPTMTASKDETIAL(184, R.string.title_mp_taobao_detial, BrowseMpTMTaskDetialFragment.class),
    BROWSEDNTAOBAOTASKDETIAL(185, R.string.title_mp_taobao_detial,
                             BrowseDnTaoBaoTaskDetialFragment.class
    ),
    BROWSEMPMGJTASK(186, R.string.title_mp_mgj_task, BrowseMpMGJTaskFragment.class),
    BROWSEMPMLSTASK(187, R.string.title_mp_mls_task, BrowseMpMLSTaskFragment.class),
    BROWSEMPJDTASK(188, R.string.title_mp_jd_task, BrowseMpJDTaskFragment.class),
    BROWSEMPTMTASK(189, R.string.title_mp_tianmao_task, BrowseMpTMTaskFragment.class),
    BROWSEDNTAOBAOTASK(190, R.string.title_dn_taobao_task, BrowseDnTaoBaoTaskFragment.class),
    MPMGJOPERATIONTASK(191, R.string.title_operation_task, MpMGJOperateFragment.class),
    MPMLSOPERATIONTASK(192, R.string.title_operation_task, MpMLSOperateFragment.class),
    MPJDOPERATIONTASK(193, R.string.title_operation_task, MpJDOperateFragment.class),
    MPMGJATTENTION(194, R.string.title_attention, MpMGJAttentionFragment.class),
    MPMLSATTENTION(195, R.string.title_attention, MpMLSAttentionFragment.class),
    MPJDATTENTION(196, R.string.title_attention, MpJDAttentionFragment.class),
    MPMGJTASKDETIAL(197, R.string.title_mp_taobao_detial, MpMGJTaskDetialFragment.class),
    MPMLSTASKDETIAL(198, R.string.title_mp_taobao_detial, MpMLSTaskDetialFragment.class),
    MPJDTASKDETIAL(199, R.string.title_mp_taobao_detial, MpJDTaskDetialFragment.class),
    MPMGJTASK(200, R.string.title_mp_mgj_task, MpMGJTaskFragment.class),
    MPMLSTASK(201, R.string.title_mp_mls_task, MpMLSTaskFragment.class),
    MPJDTASK(202, R.string.title_mp_jd_task, MpJDTaskFragment.class),
    MPTMOPERATIONTASK(203, R.string.title_operation_task, MpTMOperateFragment.class),
    MPTMATTENTION(204, R.string.title_attention, MpTMAttentionFragment.class),
    MPTMTASKDETIAL(205, R.string.title_mp_taobao_detial, MpTMTaskDetialFragment.class),
    MPTMTASK(206, R.string.title_mp_tianmao_task, MpTMTaskFragment.class),
    DNOPERATIONTASK(207, R.string.title_operation_task, DNOperationTaskFragment.class),
    DNATTENTION(208, R.string.title_attention, DNAttentionFragment.class),
    DNTAOBAOTASK(209, R.string.title_dn_taobao_task, DNTaoBaoTaskFragment.class),
    DNTAOBAOTASKDETIAL(210, R.string.title_mp_taobao_detial, DNTaoBaoTaskDetialFragment.class),
    RECEIVEDCOMPLAINDETAIL(211, R.string.title_complain_detail,
                           ReceivedComplainDetailFragment.class
    ),
    SENDCOMPLAINDETAIL(212, R.string.title_complain_detail, SendComplainDetailFragment.class),
    BANKCITY(213, R.string.title_bank_city, BankCityListInfoFragment.class),
    BANKCITYPR(214, R.string.title_bank_citypr, BankCityListFragment.class),
    BANKCITYNAME(215, R.string.title_bank_name, BankNameFragment.class),
    BANKINFO(216, R.string.title_binding_bank, BankInfoBindingFragment.class),
    BROWSEOPERATIONTASK(217, R.string.title_operation_task, BrowseOperationTaskFragment.class),
    BROWSEMPTAOBAOTASK(218, R.string.title_mp_taobao_task, BrowseMpTaoBaoTaskFragment.class),
    BROWSEMPTAOBAOTASKDETIAL(219, R.string.title_mp_taobao_detial,
                             BrowseMpTaoBaoTaskDetialFragment.class
    ),
    BROWSEATTENTION(220, R.string.title_attention, BrowseAttentionFragment.class),
    BROWSEMAKEMONEY(221, R.string.title_browse_makemoney, BrowseMakeMoneyFragment.class),
    OPERATIONTASK(222, R.string.title_operation_task, OperationTaskFragment.class),
    ATTENTION(223, R.string.title_attention, AttentionFragment.class),
    MPTAOBAOTASKDETIAL(224, R.string.title_mp_taobao_detial, MpTaoBaoTaskDetialFragment.class),
    MPTAOBAOTASK(225, R.string.title_mp_taobao_task, MpTaoBaoTaskFragment.class),
    DIANFUMAKEMONEY(226, R.string.title_dianfu_makemoney, DianFuMakeMoneyFragment.class),
    CHOOSEAGE(227, R.string.title_choose_age, ChooseAgeFragment.class),
    CHOOSECREDIBILITY(228, R.string.title_choose_gender, CredibilityFragment.class),
    CHOOSEGENDER(229, R.string.title_choose_gender, ChooseGenderFragment.class),
    GETCITYPROVINCE(230, R.string.title_getcity_province, CityListFragment.class),
    PRINCIPALDETIAL(231, R.string.title_principal_detial, PrincipalDetialFragment.class),
    COMMINSSIONDEPOSITDETIAL(232, R.string.title_commission_deposit_detial,
                             CommissionDepositDetialFragment.class
    ),
    COMMINSSIONDEPOSIT(233, R.string.title_commission_deposit, CommissionDepositFragment.class),
    COMMINSSIONDETIAL(234, R.string.title_commission_detial, CommissionDetialFragment.class),
    JIHUOBUYER(235, R.string.title_jihuo_buyer, JiHuoBuyerFragment.class),
    JIHUOUSER(236, R.string.title_jihuo_user, JiHuoUserFragment.class),
    PROMOTEUSER(237, R.string.title_promote_user, PromoteUserFragment.class),
    PROMOTEMAKEMONEY(238, R.string.title_promote_makemoney, PromoteMakeMoneyFragment.class),
    MOGUJIEBINDDING(239, R.string.title_mogujie_bindding, MoGuJieBindingFragment.class),
    JINGDONGBINDDING(240, R.string.title_jingdong_bindding, JingDongBindingFragment.class),
    MEILISAYBINDDING(241, R.string.title_meilisay_bindding, MeiLiSayBindingFragment.class),
    TAOBAOBINDDING(242, R.string.title_taobao_bindding, TaoBaoBindingFragment.class),
    QQBINDDING(243, R.string.title_qq_bindding, QQBingdingFragment.class),
    IDCERTIFICATION(244, R.string.title_id_certification, IDCertificationFragment.class),
    INTEGRALRULES(245, R.string.title_rules, IntegralRulesFragment.class),
    RULES(246, R.string.title_rules, UserRulesFragment.class),
    USERNAMESEC(247, R.string.title_user_name, ChangeUserNameSecFragment.class),
    VERSION(248, R.string.title_version, VerisonFragment.class),
    SERVICES(249, R.string.title_services, SerivesFragment.class),
    WANCHENGLV(250, R.string.title_wanchenglv, AccountWanChengLvFragment.class),
    SETUP(251, R.string.title_setup, SetUpFragment.class),
    ACCOUNTBINDING(252, R.string.title_account_binding, AccountBindingFragment.class),
    USERNAME(253, R.string.title_user_name, ChangeUserNameFragment.class),
    BROWSEONDO(254, R.string.title_browse_undo, BrowseOnDoFragment.class),
    BROWSECOMPLETE(255, R.string.title_browse_complete, BrowseComplateFragment.class),
    BROWSEUNCOMPLETE(256, R.string.title_browse_uncomplete, BrowseUnComplateFragment.class),
    ADVANCESONDO(257, R.string.title_advances_undo, AdvancesOnDoFragment.class),
    ADVANCESCOMPLETE(258, R.string.title_advances_complete, AdvancesComplateFragment.class),
    ADVANCESUNCOMPLETE(259, R.string.title_advances_uncomplete, AdvancesUnComplateFragment.class),
    PRINCIPAL(260, R.string.title_priccipal, PrincipalFragment.class),
    COMMISSION(261, R.string.title_commission, CommissionFragment.class),
    FORGETPASSWORD(262, R.string.title_forget_password, ForgetPassWordFragment.class),
    LOGIN(263, R.string.title_login, LoginFragment.class),
    WEBVIEW(264, R.string.app_name, WebViewFragment.class),
    REGISTER(265, R.string.title_register, RegisterFragment.class);

    private int title;
    private Class<?> clz;
    private int value;

    SimpleBackPage(int value, int title, Class<?> clz) {
        this.value = value;
        this.title = title;
        this.clz = clz;
    }

    SimpleBackPage(Class<?> clz, int value) {
        this.clz = clz;
        this.value = value;
    }

    public int getTitle() {
        return title;
    }

    public void setTitle(int title) {
        this.title = title;
    }

    public Class<?> getClz() {
        return clz;
    }

    public void setClz(Class<?> clz) {
        this.clz = clz;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public static SimpleBackPage getPageByValue(int val) {
        for (SimpleBackPage p : values()) {
            if (p.getValue() == val) return p;
        }
        return null;
    }
}
